<template>
    <div>
        <ul>
            <li v-for="(user) in res.rows" :key="user.id">
                {{user.name}}
            </li>
        </ul>
    </div>
</template>

<script lang='ts' setup>
const res = await getData<{ rows: [{ id: number; name: string }] }>({
    url: '/api/user',
    method: 'get',
    opts: { id: 1 },
})
</script>